<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增商铺')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-store-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">商铺编号：</label>
                <div class="col-sm-8">
                    <input name="storeNumber" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">商铺地址：</label>
                <div class="col-sm-8">
                    <input name="storeAdd" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">商铺类型(1百货,2超市,3小吃,4化妆品,5服装,6电子产品,7珠宝,8生鲜)：</label>
                <div class="col-sm-8">
                    <select name="storeType" th:with="type=${@dict.getType('store_type')}" class="form-control m-b" required>
                        <option value="">所有</option>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}">
                        </option>
                    </select>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">商铺名字：</label>
                <div class="col-sm-8">
                    <input name="storeName" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">商铺建立时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="storeBuidtime" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">商铺关闭时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="storeClosetime" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">商铺营业时间：</label>
                <div class="col-sm-8">
                    <input name="storeOpeninghours" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">商铺信息：</label>
                <div class="col-sm-8">
                    <input name="storeMessage" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">商家电话：</label>
                <div class="col-sm-8">
                    <input name="ownerTelephone" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">商铺所有者名字：</label>
                <div class="col-sm-8">
                    <input name="ownerName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">商铺状态(1营业，2关门)：</label>
                <div class="col-sm-8">
<!--                    <input name="storeState" class="form-control" type="text">-->
                    <select name="storeState" th:with="type=${@dict.getType('store_state')}" class="form-control m-b" required>
                        <option value="">所有</option>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}">
                        </option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">商铺经度：</label>
                <div class="col-sm-8">
                    <input name="storeLongitude" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">商铺纬度：</label>
                <div class="col-sm-8">
                    <input name="storeLatitude" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">商铺小图：</label>
                <div class="col-sm-8">
                    <input name="storeMinimgurl" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">商铺排名数：</label>
                <div class="col-sm-8">
                    <input name="rankingnum" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">商铺评分：</label>
                <div class="col-sm-8">
                    <input name="storeGrade" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/store"
        $("#form-store-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-store-add').serialize());
            }
        }

        $("input[name='storeBuidtime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='storeClosetime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>